//index.js
//获取应用实例
var app = getApp()
Page({
	data: {
		theme: app.globalData.theme, // 初始主题设置
		tasks: [
		      {
		        id: 'task1',
		        name: '每日登录',
		        points: 10,
		        description: '登录领取每日积分',
		        action: '去领取'
		      },
		      {
		        id: 'task2',
		        name: '邀请好友',
		        points: 50,
		        description: '成功邀请好友注册',
		        action: '去邀请'
		      },
		      {
		        id: 'task3',
		        name: '完成问卷',
		        points: 30,
		        description: '完成指定问卷调查',
		        action: '去完成'
		      }
		      // ...更多任务
		    ],
		    exchanges: [
		      {
		        id: 'exchange1',
		        name: '头像挂件',
		        imageUrl: 'path-to-avatar-accessory.png',
		        points: 200
		      },
		      {
		        id: 'exchange2',
		        name: '会员日特权',
		        imageUrl: 'path-to-vip-day.png',
		        points: 500
		      },
		      // ...更多兑换项
		    ],
		message: 'AI创作资讯通-任务',

	},
	// 通用样式主题切换
	onShow: function() {
		// 每次显示页面时，检查并应用当前主题
		this.setData({
			theme: app.globalData.theme
		});
	}
})
